import java.io.*;
import java.util.Arrays;
public class 数星星 {
    static int N = 32010;
    static int[] arr = new int[N];
    static int[] tree = new int[N];

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
         int n = Integer.parseInt(in.readLine());
         int t=n;
        while(n-- >0) {
            String[] str = in.readLine().split(" ");
            int x = Integer.parseInt(str[0]);
            x++;
            arr[sum(x)]++;
            add(x,1);
        }
        for (int i=0;i<t;i++)   out.write(arr[i] + "\n");
        out.flush();
    }
    private static int lowBit(int x) {
        return x & -x;
    }
    private static void add(int x,int v) {
        for (int i = x; i <N; i+=lowBit(i)) tree[i]+=v;
    }
    private static int sum(int x) {
        int sum = 0;
        for (int i=x;i>0;i-=lowBit(i))  sum+=tree[i];
        return sum;
    }

}
